package portal.monitor.action;

import org.springframework.beans.factory.annotation.Autowired;

import portal.common.MesageCode;
import portal.common.ResultData;
import portal.monitor.service.HostCtrlService;

public class BaseActioin {
	
	@Autowired
	protected HostCtrlService hostCtrlService;

	protected void println(String... str){
		//for(int i=0;i<str.length;i++)
			System.out.println(str);
	}
	protected ResultData success(){
		return success("success");
	}
	protected ResultData success(String mes){
		return new ResultData(MesageCode.SUCCESS,mes);
	}
	protected ResultData success(Object obj){
		return new ResultData(MesageCode.SUCCESS,"success",obj);
	}
	protected ResultData error(){
		return error("error");
	}
	protected ResultData error(String mes){
		return new ResultData(MesageCode.ERROR,mes);
	}
	
}
